<script type="text/javascript">
  function subCheck(event)
  {
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if(keyCode == 13)
    {
     $("login_form").onsubmit();
    }
  }
</script>
<div class="entry">
  <% remote_form_for :session,
      :update => :window ,
      :url => homes_show_sessions_url,
      :html => {
      :id => :login_form
    }  do |f| %>
  <div class="message">
    
      <dl>
        <dt>帐&nbsp;&nbsp;&nbsp;&nbsp;号：</dt>
        <dd><%= f.text_field :nick_name %></dd>
      </dl>
      <dl>
        <dt>密&nbsp;&nbsp;&nbsp;&nbsp;码：</dt>
        <dd><%= f.password_field :password %></dd>
        <dd><%= text_field_tag :subCheck, "", :class => :subCheck, :type => :submit %>
      </dl>
      <dl>
        <dd class='right'>
          <%= f.check_box :remember_me, {}, 'yes' %>
          <%= f.label 'remember_me','记住我', :class => "remember_me" %>
        </dd>
      </dl>
      <% if @login_failed %>
        <div class="min_error_explanation">账号与密码不匹配</div>
      <% end %>
    </div>
    <div class="other">
      <div class="skip">
        <%= link_to "快速注册,加入音乐谷", new_valleyer_url %>
      </div>
      <div>
        <%= link_to_function image_tag('valleyer/entry.jpg'),'$("login_form").onsubmit()' %>
      </div>
    </div>
  <% end %>
</div><!-- valleyers/new.js-->